export interface BaseResult<T = unknown> {
  status: number;
  message: string;
  code: string;
  data: T;
}

export interface CommonEnum {
  sort?: number;
  code?: number;
  name?: string;
  desc?: string;
  color?: string;
}

export interface MediaFileDirectory extends CommonEnum {
  dir?: string;
}

export interface MediaFile {
  code?: string; // 文件编码
  type?: CommonEnum; // 文件类型
  sourceName?: string; // 原文件名
  targetName?: string; // 新文件名
  directory?: MediaFileDirectory; // 文件目录
  path?: string; // 存储路径，相对路径，如：exampledir/exampleobject.png
  size?: bigint; // 文件大小，单位KB
}

export interface EnumCountView {
  enu?: CommonEnum;
  count?: number;
}

export interface EnhancedText {
  name?: string;
  text?: string;
  rich?: string;
  fileList?: MediaFile[];
}

export interface Page<T> {
  total?: number;
  current?: number;
  size?: number;
  records?: T[];
  orders?: any;
}

export interface BaseQry {
  pageSize?: number;
  pageIndex?: number;
  orderBy?: string;
  orderDirection?: string;
  groupBy?: string;
}

export interface BaseCmd {
  timestamp?: number;
}

export interface BaseView {
  timestamp?: number;
  id?: number;
  whenCreated?: Date;
  whenUpdated?: Date;
  whoCreated?: string;
  whoUpdated?: string;
  count?: number;
}

export interface BaseBo {
  id?: number;
  whenCreated?: Date;
  whenUpdated?: Date;
  whoCreated?: string;
  whoUpdated?: string;
}

export interface OperationLog {
  id?: any;
}

export interface NationalRegionBo extends BaseBo {
  level?: CommonEnum;
  code?: string;
  name?: string;
}

export interface AddressDetail {
  list?: NationalRegionBo[];
  title?: string;
  detail?: string;
  longitude?: string;
  latitude?: string;
}
